<?php
	require_once('../../lib/'.'BaseDir.inc.htm');
	require_once (EIU_LIB.'View.class.htm');
	require_once('../../lib/'.'DBCommon.class.htm');
	require_once (EIU_CLASS.'IOClass.htm');	
	
	$ioObj = new io_class();
	$oDB = new DBCommon();
	$conn =  $oDB->stl_openConn();
	
	$costCode=$_POST["IOCode"];
	$dateCreate= $_POST["datecreate"];
	$delivery=$_POST["deliverer"];
	$receipt=$_POST["receipter"];	
	$note=$_POST["note_input"];
	$modifiedBy=$_POST["modified"];
	$payCash=$_POST["payCash"];
	
	$res=$ioObj->updateIOList($costCode,$dateCreate,$delivery,$receipt,$payCash,$note,$modifiedBy);
	if($res)
	{
		$jsonArr["dataSearch"]["Message"] = "Update successfull";
	}
	else
	{
		$jsonArr["dataSearch"]["Message"] = "Update IO unsuccessfull";
	}
	$json = json_encode($jsonArr["dataSearch"]);
	
	echo $json;
?>
